<template>
	<view class="fixtop">
		<fixtopVue>
			<template #l>
				<view class="fixtop-l" @click="back">
					<view class="iconfont icon-jiantouyou"></view>
				</view>
			</template>
			<template #c>
				<view class="fixtop-c">
					<view class="fix-tit">
						<view :class="{wigt:lbsgowdata==0}" @click="lbsgow(0)">顾客评价</view>
						<view :class="{wigt:lbsgowdata==1}" @click="lbsgow(1)">我的评价</view>
					</view>
				</view>
			</template>
		</fixtopVue>
	</view>
	<scroll-view  class="conbox" scroll-y>
		<view class="pfen">
			<view class="pfenl">
				<view class="pfenl-l">
					4.5
				</view>
				<view class="pfenl-r">
					<view class="r-t">
						<view class="iconfont icon-xingxing" v-for="i in 5" :key="i"
							:style="{color:i!==5?'#ff644d':''}"></view>
					</view>
					<view class="r-b">
						根据最近90天评价计算所得
					</view>
				</view>
			</view>
			<view class="pfenr">
				<view class="">更多</view>
				<view class="iconfont icon-jiantouyou"></view>
			</view>
		</view>
		<view class="tit">
			<view class="">
				全部评价
			</view>
		</view>
		<view class="tit-two">
			<view class=""> 2022-11-22至2067-11-22 </view>
			<view class="">x</view>
		</view>
		<view class="nav">
			<view class="" v-for="(i,index) in navdata" :key="i.rate" @click="changenav(index)"
				:class="{actic:index==navindex}">{{i.name}}</view>
		</view>
		<view class="pl-item" v-for="i in 3" :key="i">
			<view class="ite-t">
				<view class="ite-t-l">
					<view class="ite-t-l-l">
						<image src="/static/titimg.png" mode="aspectFill"></image>
					</view>
					<view class="ite-t-l-r">
						<view class="ite-t-l-r-t">匿名用户</view>
						<view class="ite-t-l-r-b">2002-11-22</view>
					</view>
				</view>
				<view class="ite-t-r" @click="goxq">
					<view class="">详情</view>
					<view class="iconfont icon-jiantouyou"></view>
				</view>
			</view>
			<view class="ite-c">
				<view class="pj">
					<view class="">商家：</view>
					<view class="xx">
						<view class="iconfont icon-xingxing" v-for="i in 5" :key="i"
							:style="{color:i!==5?'#ff644d':''}"></view>
					</view>
					<view class="" style="margin: 0 40rpx;">味道4星</view>
					<view class="">包装4星</view>
				</view>
				<view class="tj">
					<view class="">推荐：牛肉板面、牛肉板面、牛肉板面、牛肉板面、牛肉板面、牛肉板面、牛肉板面</view>

				</view>
				<view class="pl">
					一如既往的好吃一如既往的好吃一如既往的好吃一如既往的好吃一如既往的好吃一如既往的好吃一如既往的好吃一如既往的好吃
				</view>
				<view class="img">
					<image src="/static/logo.png" mode="aspectFill"></image>
					<image src="/static/logo.png" mode="aspectFill"></image>
					<image src="/static/logo.png" mode="aspectFill"></image>
					<image src="/static/logo.png" mode="aspectFill"></image>
				</view>
			</view>
			<view class="ite-b">
				<view class="">回复</view>
			</view>
		</view>
	</scroll-view>

</template>

<script setup>
	import {
		ref
	} from 'vue'
	import fixtopVue from '../../components/fixtop/fixtop.vue';
	import {
		getstatusheight,
		gettitleheight
	} from '@/utils/getsysteminfo.js'
	const navdata = [{
			name: '全部',
			rate: 0
		},
		{
			name: '五星',
			rate: 5
		},
		{
			name: '四星',
			rate: 4
		},
		{
			name: '三星',
			rate: 3
		},
		{
			name: '二星',
			rate: 2
		},
		{
			name: '一星',
			rate: 1
		}
	]
	const product = getstatusheight() + gettitleheight() + 'px'
	const lbsgowdata=ref(0)
	const navindex = ref(0)
	const back = () => {
		uni.navigateBack()
	}
	const lbsgow=e=>{
		lbsgowdata.value=e
	}
	const changenav = e => {
		navindex.value = e
	}
	const goxq=()=>{
		uni.navigateTo({
			url:"/pages/pllook/pllook"
		})
	}
</script>

<style lang="scss" scoped>
	.pl-item {
		max-height: 700rpx;
		background-color: #fff;
		margin-top: 30rpx;
		display: flex;
		flex-direction: column;

		>view {
			overflow: hidden;
		}

		.ite-t {
			height: 120rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 0 20rpx;

			.ite-t-l {
				display: flex;
				align-items: center;
				gap: 15rpx;

				.ite-t-l-l {
					image {
						height: 90rpx;
						width: 90rpx;
						border-radius: 50%;
					}
				}

				.ite-t-l-r {
					font-size: 28rpx;
					display: flex;
					flex-direction: column;
					justify-content: center;
					gap: 5rpx;

					.ite-t-l-r-b {
						color: #7b7b7b;
						font-size: 27rpx;
					}
				}
			}

			.ite-t-r {
				font-size: 27rpx;
				display: flex;
				align-items: center;

				.iconfont {
					font-size: 27rpx;
				}
			}
		}

		.ite-c {
			flex: 1;
			display: flex;
			flex-direction: column;
			padding: 0 20rpx;
			font-size: 27rpx;
			gap: 30rpx;
			.pj{
				height: 40rpx;
				display: flex;
				align-items: center;
				font-size: 27rpx;
				.xx{
					display: flex;
				}
			}
			.tj{
				height: 70rpx;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
				overflow: hidden;
			}
			.pl{
				max-height: calc(100% - 260rpx);
				display: -webkit-box;
				-webkit-line-clamp: 3;
				-webkit-box-orient: vertical;
				overflow: hidden;
				// text-indent: 2em;
				line-height: 40rpx;
			}
			.img{
				height: 150rpx;
				display: grid;
				display: flex;
				gap: 10rpx;
				align-items: center;
				justify-content: space-between;
				// grid-template-columns: repeat(4,1fr);
				// gap: 10rpx;
				// justify-items: center;
				// align-items: center;
				image{
					height: 150rpx;
					width: 150rpx;
					border-radius: 10rpx;
				}
			}
		}

		.ite-b {
			height: 120rpx;
			display: flex;
			align-items: center;
			justify-content: flex-end;
			padding:0 20rpx;
			>view{
				padding: 10rpx 45rpx;
				font-size: 25rpx;
				border: 1rpx solid #ff644d;
				border-radius: 10rpx;
				color: #ff644d;
			}
		}
	}

	.nav {
		height: 150rpx;
		background-color: #fff;
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		justify-items: center;
		align-items: center;

		>view {
			height: 50rpx;
			width: 200rpx;
			border: 3rpx solid #4c4d4f;
			font-size: 27rpx;
			border-radius: 10rpx;
			display: flex;
			align-items: center;
			justify-content: center;
		}

		.actic {
			border: 3rpx solid #ff644d;
			color: #ff644d;
			font-weight: 700;
		}
	}

	.tit-two {
		height: 60rpx;
		background-color: #ffffdb;
		font-size: 25rpx;
		color: #7b7b7b;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 30rpx;
	}

	.tit {
		height: 100rpx;
		background-color: #fff;
		margin-top: 40rpx;
		display: flex;
		align-items: center;
		justify-content: flex-start;
		padding-left: 40rpx;
		font-size: 30rpx;
		color: #ff644d;

		>view {
			height: 60rpx;
			width: fit-content;
			position: relative;

			&:before {
				content: "";
				position: absolute;
				bottom: 0;
				left: 50%;
				transform: translateX(-50%);
				height: 4rpx;
				width: 40%;
				background-color: #ff644d;
			}
		}
	}

	.conbox {
		height: calc(100vh - v-bind(product));
		background-color: #eee;

		.pfen {
			height: 120rpx;
			background-color: #fff;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.pfenl {
				display: flex;
				align-items: center;
				justify-content: center;

				.pfenl-l {
					display: flex;
					padding: 40rpx;
					font-size: 50rpx;
					color: #ff644d;
					font-weight: 700;
				}

				.pfenl-r {
					display: flex;
					flex-direction: column;
					justify-content: center;
					font-size: 26rpx;
					gap: 10rpx;

					.r-t {
						display: flex;

						.iconfont {
							font-size: 30rpx;
						}
					}

					.r-b {
						font-size: 26rpx;
					}
				}
			}

			.pfenr {
				display: flex;
				align-items: center;
				justify-content: center;
				padding-right: 20rpx;
				font-size: 26rpx;

				.iconfont {
					font-size: 30rpx;
				}
			}
		}
	}

	.fixtop {
		background-color: #ff644d;

		.fix-tit {
			display: flex;
			height: 60rpx;
			width: 90%;
			border-radius: 30rpx;
			background-color: rgba(255, 255, 255, 0.3);
			overflow: hidden;

			>view {
				flex: 1;
				display: flex;
				align-items: center;
				justify-content: center;
				font-size: 28rpx;
			}

			.wigt {
				background-color: #fff;
				color: #ff644d;
			}
		}

		.fixtop-l,
		.fixtop-c {
			height: 100%;
			width: 100%;
			display: flex;
			align-items: center;
			color: #fff;
		}

		.fixtop-l {
			padding-left: 20rpx;

			.iconfont {
				transform: rotate(180deg);
				font-size: 25rpx;
			}
		}

		.fixtop-c {
			justify-content: center;
		}
	}
</style>